import request from '@/util/request'

export const predict = (data) => {
    return request({
        url: '/api/predict',
        method: 'post',
        data
    })
}


export const getTransactions = (params) => {
    return request({
        url: '/transactions',
        method: 'get',
        params: params
    })
}

export const addTransaction = (data) => {
    return request({
        url: '/transactions',
        method: 'post',
        data
    })
}


export const deleteTransaction = (id) => {
    return request({
        url: '/transactions/'+id,
        method: 'delete',
    })
}
export const updateTransaction = (id, data) => {
    return request({
        url: '/transactions/'+id,
        method: 'put',
        data
    })
}